﻿#include "maindialog.h"
#include "ui_maindialog.h"
#include <QQmlApplicationEngine>
#include <QMessageBox>

MainDialog::MainDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::MainDialog)
{
    ui->setupUi(this);

    ui->stackedWidget->setCurrentIndex(0);
}

MainDialog::~MainDialog()
{
    delete ui;
}

void MainDialog::on_btn1_clicked()
{
    ui->stackedWidget->setCurrentIndex(0);
}

void MainDialog::on_btn2_clicked()
{
//    QString exePath = qApp->applicationDirPath();
//    QString qml = exePath + "\\Expand\\MyUI.qml";

//    ui->quickWidget->setSource(QUrl::fromLocalFile(qml));
      ui->quickWidget->setSource(QUrl::fromLocalFile(":/MyUI.qml"));

    ui->stackedWidget->setCurrentIndex(1);
}

